<template>
  <div class="import">
    <ImportTemplate
            import-url="/system/user/import"
            download-url="/system/user/downloadTemplate"
            @success="success"/>
    <ExportData
            class="export"
            export-url="/exportData"
            @exportSuccess="exportSuccess"
    />
    <!--<ImportTemplate
            title="导入测试123"
            :disabled-upload="false"
            import-url="/system/user/import"
            download-url="/system/user/downloadTemplate"
            tip="111仅允许导入xls、xlsx格式文件。"
            :show-template="false"
            type="info"
            size="mini"
            round
            multiple
            :limit="3"
            icon="el-icon-upload"
            :auto-upload="true"
            @handleFileUploadProgress="handleFileUploadProgress"
            @handleFileSuccess="handleFileSuccess"
            @handleFileError="handleFileError"-->
    <!--
       accept=".xlsx, .xls"
    -->
  </div>
</template>

<script>

  import ImportTemplate from "../components/ImportTemplate";
  import ExportData from "../components/ExportData";
  export default {
    components: {
      ImportTemplate,
      ExportData
    },
    methods: {
      handleFileUploadProgress(event, file, fileList) {
        console.log(event)
        console.log(file)
        console.log(fileList)
      },
      success(response, file, fileList) {
        console.log(response)
        console.log(file)
        console.log(fileList)
      },
      handleFileError(response, file, fileList) {
        console.log(response)
      },
      exportSuccess(response, file, fileList) {
        console.log(response)
        console.log(file)
        console.log(fileList)
      },
    }
  }

</script>

<style scoped>
  .import {
    padding: 30px 30px;
    display: flex;
  }
  .export {
    margin-left: 20px;
  }
</style>
